package com.djnt.catering.database;

import android.content.UriMatcher;
import android.net.Uri;
import android.util.SparseArray;

class UriMatcherCode {
	static final UriMatcher sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH);
	static final SparseArray<String> sUriMatcher2QB = new SparseArray<String>();

	static final int PROVINCE = 1;
	static final int PROVINCE_ID = 2;
	static final int CITY = 3;
	static final int VIEW_CITY_PROVINCE = 4;
	static final int HOTNEWS = 5;
	static final int COMPANY_USERS = 6;
	static final int HOTNEWS_ID = 7;
	static final int VIEW_HOTNEWS_USERS = 8;
	public static final int VIEW_HOTNEWS_USERS_ID = 9;
	public static final int CITY_ID = 10;
	static final int COMPANY_USERS_ID = 11;

	static void addURI(String tableName, int code) {
		// TODO Auto-generated method stub
		sUriMatcher.addURI(CateringProvider.AUTHORITY, tableName, code);
		sUriMatcher2QB.put(code, tableName);
	}

	public static int match(Uri uri) {
		// TODO Auto-generated method stub
		return sUriMatcher.match(uri);
	}
}
